/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  dev
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    location    "system";
    object      functions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#includeFunc wallBoilingProperty(wetFraction)
#includeFunc wallBoilingProperty(dDeparture)
#includeFunc wallBoilingProperty(fDeparture)
#includeFunc wallBoilingProperty(nucleationSiteDensity)

#includeFunc removeObjects
(
    wallBoiling:wetFraction,
    wallBoiling:dDeparture,
    wallBoiling:fDeparture,
    wallBoiling:nucleationSiteDensity
)

volumeDensity.diameter.bubbles
{
    type            populationBalanceSizeDistribution;
    libs            ("libmultiphaseEulerFunctionObjects.so");
    writeControl    runTime;
    writeInterval   0.5;
    setFormat       raw;
    log             yes;
    functionType    volumeConcentration;
    coordinateType  diameter;
    cellZone
    {
        type        box;
        box         (3.48 -0.1 -0.1) (3.5 0.1 0.1);
    }
    populationBalance bubbles;
}

volumeDensity_bulk.diameter.bubbles
{
    type            populationBalanceSizeDistribution;
    libs            ("libmultiphaseEulerFunctionObjects.so");
    writeControl    runTime;
    writeInterval   0.5;
    setFormat       raw;
    log             yes;
    functionType    volumeConcentration;
    coordinateType  diameter;
    cellZone
    {
        type        box;
        box         (3.48 0.0 -0.1) (3.5 0.005 0.1);
    }
    populationBalance bubbles;
}

volumeDensity_wall.diameter.bubbles
{
    type            populationBalanceSizeDistribution;
    libs            ("libmultiphaseEulerFunctionObjects.so");
    writeControl    runTime;
    writeInterval   0.5;
    setFormat       raw;
    log             yes;
    functionType    volumeConcentration;
    coordinateType  diameter;
    cellZone
    {
        type        box;
        box         (3.48 0.0093 -0.1) (3.5 0.1 0.1);
    }
    populationBalance bubbles;
}

outflow
{
    type            surfaceFieldValue;
    libs            ("libfieldFunctionObjects.so");
    log             yes;
    writeFields     false;
    patch           outlet;
    operation       sum;
    fields          (alphaRhoPhi.gas alphaRhoPhi.liquid);
}

inflow
{
    type            surfaceFieldValue;
    libs            ("libfieldFunctionObjects.so");
    log             yes;
    writeFields     false;
    patch           inlet;
    operation       sum;
    fields          (alphaRhoPhi.gas alphaRhoPhi.liquid);
}

outletGas
{
    type            surfaceFieldValue;
    libs            ("libfieldFunctionObjects.so");
    log             yes;
    writeFields     false;
    patch           outlet;
    operation       sum;
    weightField     alphaRhoPhi.gas;
    fields          (h.gas);
}

outletLiquid
{
    type            surfaceFieldValue;
    libs            ("libfieldFunctionObjects.so");
    log             yes;
    writeFields     false;
    patch           outlet;
    operation       sum;
    weightField     alphaRhoPhi.liquid;
    fields          (h.liquid);
}

inletGas
{
    type            surfaceFieldValue;
    libs            ("libfieldFunctionObjects.so");
    log             yes;
    writeFields     false;
    patch           inlet;
    operation       sum;
    weightField     alphaRhoPhi.gas;
    fields          (h.gas);
}

inletLiquid
{
    type            surfaceFieldValue;
    libs            ("libfieldFunctionObjects.so");
    log             yes;
    writeFields     false;
    patch           inlet;
    operation       sum;
    weightField     alphaRhoPhi.liquid;
    fields          (h.liquid);
}

// ************************************************************************* //
